package group.sicher.lock.annotation;

import group.sicher.lock.constant.MarsLockType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @description: 锁注解 针对方法级注解
 * @author: aron
 * @date: 2019-08-05 11:47
 */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = {ElementType.METHOD})
public @interface MarsLock {

    MarsLockType lockType() default MarsLockType.REENTRANT;

    long lockTime() default -1;

    long waitTime() default -1;

    TimeUnit timeUnit() default TimeUnit.SECONDS;

}
